﻿using Navigant.Infrastructure;
using Navigant.Infrastructure.Cases;

namespace Navigant.Model.PreservationNotices
{
    public class PreservationNoticeTemplateService : CaseService<PreservationNoticeTemplate>
    {
        public PreservationNoticeTemplateService(ICase currentCase)
            : this(currentCase, null)
        {
        }

        public PreservationNoticeTemplateService(ICase currentCase, IUnitOfWork unitOfWork)
            : base(currentCase, unitOfWork)
        {
        }

        public PreservationNoticeTemplateService(ICase currentCase, IUnitOfWork unitOfWork,
            bool runWithElevatedPrivileges)
            : base(currentCase, unitOfWork, runWithElevatedPrivileges)
        {
        }

        public PreservationNoticeTemplate GetPreservationNoticeTemplate(int templateId)
        {
            return this.Repository.FindBy(templateId);
        }

        public void SavePreservationNoticeTemplate(PreservationNoticeTemplate template)
        {
            this.Repository.Add(template);
        }

        public void RemovePreservationNoticeTemplate(PreservationNoticeTemplate template)
        {
            this.Repository.Remove(template);
        }
    }
}
